function init(sale_id){	
	var saleId = document.getElementById("saleId");	
    $.ajax({
  		async : false,
  		cache : false,
  		type : 'GET',
  		url : 'eduSignIndustryController.do?saleUsers',// 请求的action路径
  		error : function() {// 请求失败处理函数
  		},
  		success : function(data) {
  		   var d = $.parseJSON(data);
  	        if (d.success) {
  	            var objs= d.obj;
  	            for(var i=0;i<objs.length;i++){
  	            	var obj =objs[i];
  	            	saleId.add(new Option(obj.name,obj.id));
  	            }
  	            //select checked
  	            if(sale_id != undefined){
  	            	$("#saleId").find("option[value='"+sale_id+"']").attr("selected",true);  	            	
  	            }
  	            
  	        }
  		}
    })	
}

$("#saleId").change(function(){
	var saleName=$(this).children('option:selected').text(); 
	$("#saleName").val(saleName);	
})

function createwindow_form(title, addurl,width,height) {
	width = window.top.document.body.offsetWidth;
	height = window.top.document.body.offsetHeight-100;
	if(typeof(windowapi) == 'undefined'){
		$.dialog({
			content: 'url:'+addurl,
			lock : true,
			zIndex: getzIndex(),
			width:width,
			height:height,
			title:title,
			opacity : 0.3,
			cache:false,
		    cancelVal: '',
		    cancel: true 
		});
	}else{
		W.$.dialog({
			content: 'url:'+addurl,
			lock : true,
			width:width,
			zIndex:getzIndex(),
			height:height,
			parent:windowapi,
			title:title,
			opacity : 0.3,
			cache:false,
		    cancelVal: '',
		    cancel: true 
		});
	}
}
